package com.enba.rbacadmin.module.auth.bo;

import com.enba.boot.core.utils.TreeNode;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;

/** 菜单树节点 */
@EqualsAndHashCode(callSuper = true)
@Data
public class MenuTreeNodeBo extends TreeNode implements Serializable {

  private static final long serialVersionUID = 1L;

  public MenuTreeNodeBo(Long id, Long parentId, String menuName) {
    super(id, parentId, menuName);
    this.id = id;
    this.parentId = parentId;
    this.menuName = menuName;
  }

  private Long id;

  private Long parentId;

  @ApiModelProperty("权限类型（0：目录 1：菜单 2：按钮）")
  private Integer type;

  @ApiModelProperty("菜单名称")
  private String menuName;

  @ApiModelProperty("权限码值")
  private String perms;

  @ApiModelProperty("排序")
  private Integer orderNum;

  @ApiModelProperty("菜单路径")
  private String url;

  @ApiModelProperty("图标")
  private String icon;

  @ApiModelProperty("状态（0：可用 1：禁用）")
  private Integer status;

  @ApiModelProperty("创建时间")
  private LocalDateTime createTime;

  @ApiModelProperty("更新时间")
  private LocalDateTime updateTime;

  @ApiModelProperty("删除（0：未删除 1：已删除）")
  private Integer deleted;

  /*
   *
   * [
  {
  	"id": 1,
  	"title": "工作空间",
  	"icon": "layui-icon layui-icon-console",
  	"type": 0,
  	"children": [
  		{
  			"id": "10",
  			"title": "分析页",
  			"icon": "layui-icon layui-icon-console",
  			"type": 1,
  			"openType": "_component",
  			"href": "view/analysis/index.html"
  		},
  		{
  			"id": "11",
  			"title": "工作台",
  			"icon": "layui-icon layui-icon-console",
  			"type": 1,
  			"openType": "_component",
  			"href": "view/console/index.html"
  		}
  	]
  }
  ]
   *
   * */
}
